<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Paint Blog Template - free CSS template</title>
<meta name="keywords"
	content="paint blog, free templates, website templates, CSS, HTML" />
<meta name="description"
	content="Paint Blog - free blog website template provided by templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!--  Free CSS Template is designed by templatemo.com  -->
<!--[if lt IE 7]>
<style type="text/css">

  .date_section, .comment{ behavior: url(iepngfix.htc); }

</style>
<![endif]-->
<script type="text/javascript">
function openDetail(name)
{
	//confirm("this active is yes");
	document.location='viewDetail.action?govName='+name;
	
}
function showConfirmAndOpenDetail(name)
{
	
	if(confirm("Do you want to active this government office region?"))
		{
			document.location='viewDetail.action?govName='+name;
			
		}
}
</script>

<style type="text/css">
.top {
	border: 0px solid #ccc;
	overflow: hidden;
	padding: 0;
	margin: 0;
	padding-bottom: 2px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
}

.top-left {
	border: 0px solid #ccc;
	font: bold 14px Arial, Verdana, Helvetica, sans-serif;
	float: left;
	padding: 5px 0;
}

.top-right {
	border: 0px solid #ccc;
	float: right;
	text-align: right;
}

.details1 {
	overflow: hidden;
}

.content-left {
	float: left;
	padding-right: 20px;
	border: 0px solid #ccc;
}

.content-right {
	float: right;
	border: 0px solid #ccc;
}

.frm .field {
	display: table;
	margin: 5px;
}

.frm div label {
	width: 150px;
	word-wrap: break-word;
	display: table-cell;
	vertical-align: middle;
	position: static;
}

.frm textarea {
	width: 260px;
	height: 80px;
}

.frm input[type="text"],input[type="password"] {
	width: 260px;
}

.lstcbb {
	width: 260px;
	height: 95px;
	overflow-y: auto;
	border: 1px solid #ccc;
	background-color: #fff;
	display: auto;
}
</style>

</head>
<body>
	<%
		if (session.getAttribute("username") == null)
			response.sendRedirect("login.jsp");
	%>
	<%@include file="header.jsp"%>
	<!-- end of menu -->

	<div id="content" align="center">
		<div id="mainContainer">
			<div class="box">
				<div id="container-orglst">
					<div id="tab5" class="tabContents details4">
						<h1>Govermenr Office List</h1>
						<div class="top">
							<div class="top-left filter">

								<s:url action="selectAll" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">All |</s:a>

								<s:url action="select09" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">0-9 |</s:a>

								<s:url action="selectABCDE.action" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">A B C D E |</s:a>

								<s:url action="selectFGHIJ" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">F G H I J |</s:a>

								<s:url action="selectKLMN" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">K L M N |</s:a>

								<s:url action="selectOPQR" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">O P Q R |</s:a>

								<s:url action="selectTUV" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">T U V |</s:a>

								<s:url action="selectWXYZ" var="urlTag">
								</s:url>
								<s:a href="%{urlTag}">W X Y Z</s:a>

							</div>
							<div class="top-right include"
								style="width: 350px; display: inline; margin-bottom: 10px; padding: 0">
								<div id="checkActive">
									<form action="checkbox" id="FormIncludeInActive" method="post">
										<s:checkbox name="includeInActive" id="includeInActive"
											onclick="FormIncludeInActive.submit();"
											label="Include In-Active"><label for="org_name">Include In-Active</label>
										</s:checkbox>
									</form>
								</div>
							</div>
						</div>
						<div class="clear"></div>

						<div class="div-table" style="border: none;">
							<div class="table-list"  style="height: 450px;">
								<table id="sizeOptions" width="100%" align="center">
									<thead>
										<tr>
											<th>Govt Office Region Name</th>
											<th>Description</th>
											<th>County</th>
											<th>Is active?</th>

										</tr>
									</thead>

									<tbody>
										<s:iterator value="listGov">
											<tr>
												<td>
													<%-- 							<s:url action="viewDetail" var="urlTag"> --%> <%-- 							<s:param name="govName"><s:property value="GovName"/></s:param> --%>
													<%-- 							</s:url> --%> <%-- 							<a href="<s:property value="#urlTag"/>" ><s:property value="GovName"/></a> --%>



													<label for="org_name"><s:set name="active" value="IsActive" /> <s:set
														name="name" value="GovName" /> <a href="#"
													onclick="<s:if test="%{#active=='yes'}">openDetail('${name}')</s:if> 
										<s:else>showConfirmAndOpenDetail('${name}')</s:else>">${name}</a></label>

												</td>
												<td><label for="org_name"><s:property value="description" /></label></td>
												<td><label for="org_name"><s:property value="county" /></label></td>
												<td><label for="org_name"><s:property value="IsActive" /></label></td>

											</tr>
										</s:iterator>

									</tbody>
								</table>
							</div>

							<span class="pagelinks"> <a href="#"><img
									src="firstpage.PNG" title="First Page" alt="First Page" /> </a> <a
								href="#"><img src="prevpage.PNG" title="Prev Page"
									alt="Prev Page" /> </a> Page <input
								style="font-size: 12px; width: 35px; padding: 4px;"
								class="curpage" type="text" name="b" value="1" /> of <span
								class="nops">1</span> <a href="#"><img src="nextpage.PNG"
									title="Next Page" alt="Next Page" /> </a> <a href="#"><img
									src="lastpage.PNG" title="Last Page" alt="Last Page" /> </a> </span>
						</div>
						<!-- end of content right -->

						<div class="cleaner_with_height">&nbsp;</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- end of content panel -->

	<%@include file="footer.jsp"%>
	<!--  Free CSS Template is designed by templatemo.com  -->
</body>
</html>